package sunyu.tools.kafka;

import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;
import org.springframework.util.concurrent.ListenableFuture;

import javax.annotation.Resource;

@Component
public class KafkaTools {

    @Resource(name = "kafkaTemplate")
    private KafkaTemplate<?, String> template;

    public ListenableFuture<?> send(String data) {
        return template.sendDefault(data);
    }

}
